#!/bin/bash

# ----------------------------------------------------------------------
# Filename:   75686-autrace.sh
# Version:    1.0
# Date:       2013/12/13
# Author:     yuanhui.shi
# Email:      yuanhui.shi@cs2c.com.cn
# Summary:    03系统安全功能-02审计功能-05autrace-01审计追踪
# Notes:      autrace
# Copyright:  China Standard Software Co., Ltd.
# History：     
#             Version 1.0, 2013/12/13
#             -   The first one
# ----------------------------------------------------------------------

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

source ../../../lib/Echo.sh
source ./lib/cmd.sh
source ../../../lib/XmlParse.sh


function CleanData ()
{
  rm -rf /tmp/mm
  rm -rf /tmp/tmp1
  EchoInfo "75686-autrace.sh执行完毕"
}

trap "CleanData" EXIT

touch /tmp/mm
autrace /bin/cat /tmp/mm &>/tmp/tmp1

[ -n "`cat /tmp/tmp1 |grep 'Trace complete'`" ]
EchoResult "autrace 命令正确"
